package com.computergames.server.message;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.stereotype.Component;


@EqualsAndHashCode(callSuper = true)
@Data
public class LoginRequestMessage extends Message {
    private String username;

    // 这里不对密码进行实际加密处理，但在实际应用中实现加密逻辑
    private String password; // 实践中应使用加密方式存储和传输密码

    public LoginRequestMessage(){
    }

    public LoginRequestMessage(String username, String password) {
        this.username = username;
        this.password = password;// 这里可以添加加密逻辑
    }

    @Override
    public int getMessageType() {
        return LoginRequestMessage;
    }
}
